package br.edu.unilasalle.simon_api.rs;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.springframework.beans.factory.annotation.Autowired;

import br.edu.unilasalle.simon_api.domain.Usuario;
import br.edu.unilasalle.simon_api.service.IUsuarioService;

@Path("/login")
public class LoginRS {
	
	@Autowired
	private IUsuarioService service;
	
    @GET
    @Path("{login}/{senha}")
    @Produces(MediaType.APPLICATION_JSON)
    public Usuario getUsuarioByLoginSenha(@PathParam("login") String login, @PathParam("senha") String senha) {
        return service.getUsuarioByLoginSenha(login, senha);
    }

}
